
import FormItems from "@/components/FormItems";
import { Breadcrumb, Button, Card, Col, Form, Row } from "antd";
const labels = [
  {
    title: '当前密码',
    dataIndex: 'current',
    pwd: true
  },
  {
    title: '新密码',
    dataIndex: 'new',
    pwd: true
  },
  {
    title: '确认密码',
    dataIndex: 'confirm',
    pwd: true
  },
]
export default function ChangePassword() {
  const onFinish = (values) => {
    console.log(values)
  }
  return (
    <div>
      <h2 className="headline">密码修改</h2>
      <Card>
        <Form layout="vertical" onFinish={onFinish} style={{
          maxWidth: 600,
          margin: 'auto'
        }}>
          <Row gutter='24'>
            {labels.map(item => <Col span={24} key={item.dataIndex}>
              <FormItems item={item}></FormItems>
            </Col>)}
          </Row>
          <Form.Item style={{ textAlign: 'center' }}>
            <Button type="primary" size="large" htmlType="submit">
              确认修改
            </Button>
          </Form.Item>
        </Form>
      </Card>
    </div >
  )
}
